<!--
 * @Author: 李明明
 * @Date: 2022-04-29 15:25:27
 * @LastEditTime: 2022-05-05 16:58:55
 * @LastEditors: 李明明
 * @Description: 
 * @FilePath: /官网pc端/web/html/fragment/index-banner.htm
 * 代码版权方：'政府采购信息网'
-->
<link rel="stylesheet" href="/web/lib/swiper-2.7.6.css">
<link rel="stylesheet" href="/web/public/css/cover-icon.css">
<div class="banner swiper-container">
  <div class="swiper-wrapper">
    <div class="swiper-slide cover">
      <img class="left-top-icon" src="/web/img/special.png" alt="文本类">
      <img class="large-play x-y-center" src="/web/img/play-icon.png" alt="音视频类">
      <a href="###" title="顶尖技术武装全新K5凯酷 起亚全球战略车型导入东方撒扥">
        <img src="/web/img/banner-1.jpg" alt="">
      </a>
      <div class="title">
        <a href="//baidu.com" target="_blank" title="顶尖技术武装全新K5凯酷 起亚全球战略车型导入东方撒扥">顶尖技术武装全新K5凯酷 起亚全球战略车型导入东方撒扥</a>
      </div>
    </div>
  </div>
  <div class="pagination"></div>
  <div class="swiper-button-prev swiper_btn"></div>
  <div class="swiper-button-next swiper_btn"></div>
</div>
<script src="/web/lib/swiper-2.7.6.min.js"></script>
<script>
    $(function () {
        var slidIndex = sessionStorage.getItem('slidIndex')?parseInt(sessionStorage.getItem('slidIndex')):0;
        slidIndex = slidIndex<$('.banner .swiper-wrapper .swiper-slide').length-1?slidIndex+1:0;
        sessionStorage.setItem('slidIndex',slidIndex);
        var mySwiper = new Swiper('.banner.swiper-container',{
            loop: true,
            autoplay: false,
            initialSlide:slidIndex,
            pagination : '.banner .pagination',
            paginationClickable:true,
            onSlideChangeEnd(e){
                slidIndex = e.activeLoopIndex;
                sessionStorage.setItem('slidIndex',slidIndex);

            },
        });
        $('.banner .swiper-button-prev').on('click', function(e){
            e.preventDefault()
            mySwiper.swipePrev();
        });
        $('.banner .swiper-button-next').on('click', function(e){
            e.preventDefault()
            mySwiper.swipeNext();
        });
    })

</script>